<!DOCTYPE html>
<html>
{include file="public:header"}

<body class="no-skin">
<!--头部-->
{include file="public:nav"}

<div class="main-container ace-save-state" id="main-container">
  <!--菜单-->
  <script type="text/javascript">
  try{ace.settings.loadState('main-container')}catch(e){}
</script>

{include file="public:left"}

  <div class="main-content">
    <div class="main-content-inner">
      <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
          <li>
            <i class="ace-icon fa fa-home home-icon"></i>
            <a href="{:url('Index/index')}">首页</a>
          </li>
          <li class="active">留言管理</li>
        </ul><!-- /.breadcrumb -->

      </div>

      <div class="page-content">

        {include file="public:set"}

        <div class="row">
          <div class="col-xs-12">
            <div class="col-sm-10 col-sm-offset-1">
              <div class="page-header">
                <div class="row">
                  <div class="col-sm-4">
                    <button class="btn btn-danger btn-white btn-bold del-btn">
                      <i class="ace-icon fa fa-trash-o icon-only"></i>
                      删除</button>
                  </div>

             <!--  <div class="col-sm-8 clearfix">
                <form id="search" class="form-inline pull-right">
                  <div class="form-group">
                    <div class="input-group">
									<span class="input-group-addon">
											<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
										</span>
                      <input type="text" class="form-control" value="" placeholder="点击选择日期范围" name="date-range-picker"
                             id="id-date-range-picker-1" value>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="input-group">
									<span class="input-group-addon">
										<i class="ace-icon fa fa-check"></i>
									</span>
                      <input type="text" name="words" id="words" class="form-control search-query" value="" placeholder="请输入需查询的关键字">
                      <span class="input-group-btn">
										<button type="submit" class="btn btn-info btn-sm ajax-search-form">
											<span class="ace-icon fa fa-search icon-on-right bigger-120"></span> 搜索
									</button>
									</span>
                    </div>
                  </div>
                </form>
              </div> -->
              </div>
              </div>
              <table class="table table-bordered table-hover">
                <thead>
                <tr>
                  <th class="center">
                    <label class="pos-rel">
                      <input type="checkbox" class="ace checkAll">
                      <span class="lbl"></span>
                    </label>
                  </th>
                  <th>ID</th>
                  <th class="hidden-480">姓名</th>
                  <th class="hidden-480">手机号码</th>
                  <th class="hidden-480">业务类型</th>
                  <th class="hidden-480">内容</th>
                  <th>提交时间</th>
                  <th style="border-right:#ddd solid 1px;">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="v"}
                <tr>
                  <td class="center"><label class="pos-rel">
                    <input type="checkbox" class="ace check" value="{$v.id}">
                    <span class="lbl"></span>
                  </label>
                  </td>
                  <td><span class="badge badge-grey">{$v.id}</span></td>
                  <td class="hidden-480">{$v.username}</td>
                  <td class="hidden-480">{$v.phone}</td>
                  <td class="hidden-480">{$v.ty_name}</td>
                  <td class="hidden-480">{$v.content|mb_substr=0,20,'utf8'}</td>
                  <td>{$v.time|date='Y-m-d H:i:s',###}</td>
              
                  <td>
                    <button class="btn btn-xs btn-warning" onclick="ajaxQuery('look',{$v.id},readData)">
                      <i class="ace-icon fa fa-eye bigger-120"></i>
                    </button>
                    <button class="btn btn-xs btn-danger" onclick="dels({$v.id})">
                      <i class="ace-icon fa fa-trash-o bigger-120"></i>
                    </button>
                  </td>
                </tr>
                {/volist}
                 {empty name="list"}<tr><td colspan="9" class="text-center">暂无数据</td></tr>{/empty}
                </tbody>
              </table>
              <div class="text-center">
                {$page}
              </div>
            </div>
            <!-- PAGE CONTENT BEGINS -->

            <!-- PAGE CONTENT ENDS -->
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.page-content -->
    </div>
  </div><!-- /.main-content -->
  <!-- Modal -->
  <div class="modal fade" id="read" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">查看</h4>
        </div>
        <div class="modal-body">
          <p>
            Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.
          </p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
      </div>
    </div>
  </div>

  <div class="footer">
  <div class="footer-inner">
    <div class="footer-content">
						<span class="bigger-110">
							<span class="blue bolder">Ace</span>
							朵朵科技CMS &copy; 2018-2020
						</span>

      &nbsp; &nbsp;
      <a href="http://www.dd371.com" target="_blank">技术支持: 朵朵科技</a>
      <!--<span class="action-buttons">-->
							<!--<a href="#">-->
								<!--<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>-->
							<!--</a>-->

							<!--<a href="#">-->
								<!--<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>-->
							<!--</a>-->

							<!--<a href="#">-->
								<!--<i class="ace-icon fa fa-rss-square orange bigger-150"></i>-->
							<!--</a>-->
						<!--</span>-->
    </div>
  </div>
</div>

<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
  <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
</a>
</div><!-- /.main-container -->


<script>
  jQuery(function($) {
    $('[data-rel=tooltip]').tooltip();

    $( "#hide-option" ).tooltip({
      hide: {
        effect: "explode",
        delay: 250
      }
    });

  })
</script>
<script type="text/javascript">
		function dels(id){
			layer.confirm('你确定删除吗？', {icon: 3}, function(index){
		    layer.close(index);
		    window.location.href="__URL__/delete/id/"+id;
		  });
	    }
		</script>

  <script>
    $(function () {
      $("#search").ajaxForm({

      })

      //添加-模态框保存
      $("#save-btn").on(ace.click_event,function () {
        //获取form表单,执行ajaxSubmit提交
        $("#read").ajaxSubmit({
          // url: 'links.html',
          // type: 'post',
          success: function(res){
            //后台返回状态,保存成功
            if(res.statu == 1){
              success(res.info,"asdasdasdas");
              //关闭模态框
              $('#read').modal('hide');
            }else{
              error("添加失败asdasd","asdasdasdas");
            }
          }
        })
      })
    });

    //向模态框写入数据
    function readData(data) {
      $(".modal-body").text(data.content);      
      $('#read').modal('show');
    }

    function gs() {
      console.log(1)
    }


  </script>
</body>
</html>
